package week5;

import java.util.Random;

public class GaphicProxy implements Elment {
    private Elment elment;
    public GaphicProxy(Elment elment){
        this.elment=elment;
    }
    @Override
    public void Draw() {
        Random random =new Random();
        if(random.nextBoolean()) {
            System.out.println("我是X！");
            elment.Draw();
        }
        else {
            System.out.print("没有X");
        }
    }
}
